<template>
	<view class="index-top-box">
		<view class="head">
			<view class="bgs_img">
				<image :src="DEFAULT_CHIRDREN_TY" mode=""></image>
			</view>
			<view class="min-texts">
				<text class="theme">{{organization}}</text>
				<view class="campus">
					<!-- <view class="shool_names">{{school_name}}</view> -->
			
				</view>
				<!-- <text class="teacher-name">{{class_name}}</text> -->
				<text class="teacher-name">{{customer_name}}家长</text>
		   </view>
			<view class="banner_min">
				<!-- <image src="https://elite-league.oss-cn-shanghai.aliyuncs.com/miniapp-service/static/pub-img/tatle.png"><111/image> -->
				<swiper indicator-dots="true" autoplay="true" interval="3000" duration="1000" circular="true">
					<swiper-item v-for="(item,index) in bannerData" :key="index">
						<view class="swiper-item">
							<image :src="item.banner_image+'?x-oss-process=image/resize,m_lfit,h_520,w_520'" mode="scaleToFill"></image>
						</view>
					</swiper-item>
				</swiper>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		props:{
		// 	testData: {
		// 		type: String,
		// 		default: 'uniapp',
		// 	},
			bannerData : {
				type: Array,
			},
			customer : {
				type: Object,
			},
		},
		data() { 
			return {
				class_name: getApp().globalData.currentCustomer.class_name || '',
				customer_name: '',
				school_name: getApp().globalData.currentCustomer.school_name || '',
				
				campus: [
					'GANOR佳诺国际',
				],
				index : 0,
				bannerArr: [],
				auth_school: {},
				organization:this.config.DEFAULT_ORGANIZATION,
				DEFAULT_CHIRDREN_TY: this.config.DEFAULT_CHIRDREN_TY
			};
		},
		created() {
		},
		mounted() {
				this.customer_name = getApp().globalData.currentCustomer != undefined ? getApp().globalData.currentCustomer.stu_name  : '亲爱的';
		},
		methods:{
			selectSchool :function (e) {
				 this.index = e.target.value;
			},
		}
	}
</script>
<style lang="scss">
	.index-top-box {
		.banner_min{
			position: absolute;
			// top:20%;
			bottom: 15rpx;
			left:30rpx;
			width:690rpx;
			height: 300rpx;
			margin:10rpx auto 10rpx;
			image{
				width:100%;
				height:300rpx;
				border-radius: 20rpx;
			}
		}
		.shool_names{
			font-size:30rpx;
		}
		.head {
			width: 100%;
			height: 594rpx;
			position: relative;
			.min-texts{
				position: relative;
			}
			.bgs_img{
				width:100%;
				position: relative;
				image{
					width:100%;
					height: 341rpx;
					margin:0;
					position: absolute;
					top:0;
				}
			}
			.theme {
				font-size: 32rpx;
				font-family: PingFangSC-Semibold, PingFang SC;
				font-weight: 600;
				color: white;
				margin: 56rpx auto 0;
				display: inline-block;
				width: 100%;
				text-align: center;
			}
			.campus {
				font-size: 22rpx;
				font-family: PingFangSC-Semibold, PingFang SC;
				font-weight: 600;
				color: rgba(255, 255, 255, 1);
				margin: 30rpx 0 0 30rpx;
				align-items: center;
				.triangle {
					width: 0;
					height: 0;
					overflow: hidden;
					font-size: 0;
					line-height: 0;
					border-width: 10rpx;
					border-style: solid;
					border-color: #fff transparent transparent transparent;
					margin-left: 12rpx;
					padding-top: 6rpx;
				}
			}
			.teacher-name {
				font-size: 36rpx;
				font-family: PingFangSC-Semibold, PingFang SC;
				font-weight: 600;
				color: rgba(255, 255, 255, 1);
				margin: 0 0 0 30rpx;
			}
			image {
				width: 100%;
				object-fit:scale-down;
			}
		}
	}
</style>
